<!DOCTYPE html>
<html lang="en">
  <head>
    <title>EXAMPLES  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset="utf-8">
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
    <script src="js/lunr.min.js" defer></script>
    <script src="js/typeahead.jquery.js" defer></script>
    <script src="js/jazzy.search.js" defer></script>
  </head>
  <body>


    <a title="EXAMPLES  Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="index.html">
          RouteComposer 2.9.0 Docs
        </a>
         (100% documented)
      </p>
    
      <div class="header-col--secondary">
        <form role="search" action="search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </div>
    
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="index.html">RouteComposer Reference</a>
      <img class="carat" src="img/carat.png" alt=""/>
      EXAMPLES  Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Core%20Entities.html">Core Entities</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/Router.html">Router</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/RoutingError.html">RoutingError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/RoutingError/InitialControllerErrorState.html">– InitialControllerErrorState</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/RoutingError/Context.html">– Context</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DestinationStep.html">DestinationStep</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/Finder.html">Finder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/Factory.html">Factory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContainerFactory.html">ContainerFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Core%20Entities.html#/s:13RouteComposer6ActionP">Action</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContainerAction.html">ContainerAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/RoutingResult.html">RoutingResult</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/RouteComposerDefaults.html">RouteComposerDefaults</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Tasks.html">Tasks</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/RoutingInterceptor.html">RoutingInterceptor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContextTask.html">ContextTask</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/PostRoutingTask.html">PostRoutingTask</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Assemblies.html">Assemblies</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/StepAssembly.html">StepAssembly</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SwitchAssembly.html">SwitchAssembly</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/ChainAssembly.html">ChainAssembly</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/CompleteFactoryAssembly.html">CompleteFactoryAssembly</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Additional%20Assemblies.html">Additional Assemblies</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SingleStep.html">SingleStep</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SingleContainerStep.html">SingleContainerStep</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Factories.html">Factories</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/ClassFactory.html">ClassFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/StoryboardFactory.html">StoryboardFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/FinderFactory.html">FinderFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/NavigationControllerFactory.html">NavigationControllerFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/TabBarControllerFactory.html">TabBarControllerFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/SplitControllerFactory.html">SplitControllerFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/NilFactory.html">NilFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/UIHostingControllerFactory.html">UIHostingControllerFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/UIHostingControllerWithContextFactory.html">UIHostingControllerWithContextFactory</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Finders.html">Finders</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/StackIteratingFinder.html">StackIteratingFinder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/ClassFinder.html">ClassFinder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/InstanceFinder.html">InstanceFinder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/NilFinder.html">NilFinder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/UIHostingControllerWithContextFinder.html">UIHostingControllerWithContextFinder</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Steps.html">Steps</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/GeneralStep.html">GeneralStep</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/NavigationControllerStep.html">NavigationControllerStep</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/TabBarControllerStep.html">TabBarControllerStep</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SplitControllerStep.html">SplitControllerStep</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="UIViewController%27s%20protocols.html">UIViewController&#39;s protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/RoutingInterceptable.html">RoutingInterceptable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContainerViewController.html">ContainerViewController</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="General%20Actions.html">General Actions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/GeneralAction.html">GeneralAction</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Logging.html">Logging</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/Logger.html">Logger</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/LogMessage.html">LogMessage</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Extras.html">Extras</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/Destination.html">Destination</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extras.html#/s:13RouteComposer14AnyDestinationa">AnyDestination</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/InlineFactory.html">InlineFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/InlineStackIteratingFinder.html">InlineStackIteratingFinder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/InlineInterceptor.html">InlineInterceptor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/InlineContextTask.html">InlineContextTask</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/InlinePostTask.html">InlinePostTask</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/NavigationDelayingInterceptor.html">NavigationDelayingInterceptor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/NavigationDelayingInterceptor/Strategy.html">– Strategy</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/SingleNavigationRouter.html">SingleNavigationRouter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/GlobalInterceptorRouter.html">GlobalInterceptorRouter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/PresentingFinder.html">PresentingFinder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/PresentingFinder/StartingPoint.html">– StartingPoint</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/ContextSettingTask.html">ContextSettingTask</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContextAccepting.html">ContextAccepting</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContextAcceptingView.html">ContextAcceptingView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContextInstantiatable.html">ContextInstantiatable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/ClassWithContextFinder.html">ClassWithContextFinder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContextChecking.html">ContextChecking</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DismissalMethodProvidingContextTask.html">DismissalMethodProvidingContextTask</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/Dismissible.html">Dismissible</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/DismissibleWithRuntimeStorage.html">DismissibleWithRuntimeStorage</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DetailsNavigationFinder.html">DetailsNavigationFinder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/CATransaction.html">CATransaction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/DispatchQueue.html">DispatchQueue</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other%20Guides.html">Other Guides</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="code_of_conduct.html">CODE_OF_CONDUCT</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="contributing.html">CONTRIBUTING</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="examples.html">EXAMPLES</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="readme.html">README</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other%20Classes.html">Other Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/ActionToStepIntegrator.html">ActionToStepIntegrator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/CompleteFactoryChainAssembly.html">CompleteFactoryChainAssembly</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/GenericStepAssembly.html">GenericStepAssembly</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other%20Classes.html#/s:13RouteComposer27IntermediateDestinationStepC">IntermediateDestinationStep</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SingleNavigationLock.html">SingleNavigationLock</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other%20Enums.html">Other Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/NavigationControllerActions.html">NavigationControllerActions</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/NavigationControllerActions/PushAction.html">– PushAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/NavigationControllerActions/PushAsRootAction.html">– PushAsRootAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/NavigationControllerActions/PushReplacingLastAction.html">– PushReplacingLastAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/SplitViewControllerActions.html">SplitViewControllerActions</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/SplitViewControllerActions/SetAsMasterAction.html">– SetAsMasterAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/SplitViewControllerActions/PushToDetailsAction.html">– PushToDetailsAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/SplitViewControllerActions/PushOnToDetailsAction.html">– PushOnToDetailsAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/TabBarControllerActions.html">TabBarControllerActions</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/TabBarControllerActions/AddTabAction.html">– AddTabAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/ViewControllerActions.html">ViewControllerActions</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/ViewControllerActions/PresentModallyAction.html">– PresentModallyAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/ViewControllerActions/ReplaceRootAction.html">– ReplaceRootAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/ViewControllerActions/NilAction.html">– NilAction</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other%20Extensions.html">Other Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Array.html">Array</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UIHostingController.html">UIHostingController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UINavigationController.html">UINavigationController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UISplitViewController.html">UISplitViewController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UITabBarController.html">UITabBarController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UIViewController.html">UIViewController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UIWindow.html">UIWindow</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other%20Protocols.html">Other Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/AbstractAction.html">AbstractAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/AbstractFactory.html">AbstractFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ConcreteContainerAdapter.html">ConcreteContainerAdapter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContainerAdapter.html">ContainerAdapter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/ContainerAdapterLocator.html">ContainerAdapterLocator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/CustomContainerViewController.html">CustomContainerViewController</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/InterceptableRouter.html">InterceptableRouter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other%20Protocols.html#/s:13RouteComposer9NilEntityP">NilEntity</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/SimpleContainerFactory.html">SimpleContainerFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/StackIterator.html">StackIterator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/StackPresentationHandler.html">StackPresentationHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/WindowProvider.html">WindowProvider</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other%20Structs.html">Other Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/ActionConnectingAssembly.html">ActionConnectingAssembly</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/CATransactionWrappedAction.html">CATransactionWrappedAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/CATransactionWrappedContainerAction.html">CATransactionWrappedContainerAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/ChildCoordinator.html">ChildCoordinator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/CompleteFactory.html">CompleteFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/ContainerStepChainAssembly.html">ContainerStepChainAssembly</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/CustomWindowProvider.html">CustomWindowProvider</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DefaultContainerAdapterLocator.html">DefaultContainerAdapterLocator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DefaultLogger.html">DefaultLogger</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DefaultLogger/LogLevel.html">– LogLevel</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DefaultRouter.html">DefaultRouter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DefaultStackIterator.html">DefaultStackIterator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DefaultStackIterator/StartingPoint.html">– StartingPoint</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DefaultStackPresentationHandler.html">DefaultStackPresentationHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DispatchQueueWrappedAction.html">DispatchQueueWrappedAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/DispatchQueueWrappedContainerAction.html">DispatchQueueWrappedContainerAction</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/KeyWindowProvider.html">KeyWindowProvider</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/LastStepInChainAssembly.html">LastStepInChainAssembly</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/NavigationControllerAdapter.html">NavigationControllerAdapter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/SearchOptions.html">SearchOptions</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/SplitControllerAdapter.html">SplitControllerAdapter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/StepChainAssembly.html">StepChainAssembly</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/TabBarControllerAdapter.html">TabBarControllerAdapter</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            
            <h1 id='deeper-into-the-configuration' class='heading'>Deeper into the configuration</h1>
<h3 id='how-the-code-router-code-parses-the-configuration' class='heading'>How the <code><a href="Protocols/Router.html">Router</a></code> parses the configuration:</h3>

<p>The <code><a href="Protocols/Router.html">Router</a></code> goes by the chain of steps starting from the first step. If the <code><a href="Protocols/Finder.html">Finder</a></code> of this step says that the <code>UIViewController</code> of this step does not exist, it moves on to the next one. It does this until one of the finders say that it has found the <code>UIViewController</code> described in the chain. Then <code><a href="Protocols/Router.html">Router</a></code> starts to move backwards through the chain of steps and starts to create the <code>UIViewController</code> for each step using its <code><a href="Protocols/Factory.html">Factory</a></code> and integrates it into the stack using the <code><a href="Core%20Entities.html#/s:13RouteComposer6ActionP">Action</a></code> attached to this step.</p>

<p>It is easier to think about how to configure your routing to the <code>UIViewController</code> if you start to think that the user can be anywhere in the application and has received an universal link that requests your application to show a particular <code>UIViewController</code>.</p>
<h3 id='code-stackiteratingfinder-code-options' class='heading'><code><a href="Protocols/StackIteratingFinder.html">StackIteratingFinder</a></code> options:</h3>

<p>Behaviour of the <code><a href="Protocols/StackIteratingFinder.html">StackIteratingFinder</a></code> can be changed using the <code><a href="Structs/SearchOptions.html">SearchOptions</a></code>. They are:</p>

<ul>
<li><code>current</code>: The topmost view controller</li>
<li><code>visible</code>: If the view controller is a container, search in its visible view controllers (Example: <code>UINavigationController</code> always has one visible view controller, <code>UISplitController</code> which can han have 2 visible controllers if expanded.)</li>
<li><code>contained</code>: If the view controller is a container, search in all the view controllers it contains (i.e. All the view controllers in the <code>UINavigationController</code> before the one that is currently visible)</li>
<li><code>presenting</code>: Search in all the view controllers that are under the topmost one</li>
<li><code>presented</code>: Search from the view controller provided in all the view controllers that it are presented</li>
</ul>

<p>The next image may help you to imagine <code><a href="Structs/SearchOptions.html">SearchOptions</a></code> in the real app:</p>

<p><img src="https://habrastorage.org/webt/4j/pn/p5/4jpnp5peadzdj-cbk0tlfusbwxe.png" alt=""></p>

<p>If you want it so that the <code><a href="Protocols/StackIteratingFinder.html">StackIteratingFinder</a></code> would look for the desired view controller everywhere, but only if they are visible, it should be set like the following:</p>
<pre class="highlight swift"><code><span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">AccountViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(</span><span class="nv">options</span><span class="p">:</span> <span class="p">[</span><span class="o">.</span><span class="n">current</span><span class="p">,</span> <span class="o">.</span><span class="n">visible</span><span class="p">,</span> <span class="o">.</span><span class="n">presenting</span><span class="p">])</span>
</code></pre>
<h3 id='q-amp-a' class='heading'>Q&amp;A:</h3>
<h4 id='i-have-some-code-uiviewcontroller-code-as-a-root-and-i-want-it-to-be-replaced-with-the-code-homeviewcontroller-code' class='heading'>I have some <code>UIViewController</code> as a root and I want it to be replaced with the <code>HomeViewController</code>:</h4>
<pre class="highlight swift"><code>    <span class="k">let</span> <span class="nv">screen</span> <span class="o">=</span> <span class="kt">StepAssembly</span><span class="p">(</span>
            <span class="nv">finder</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">HomeViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(),</span>
            <span class="nv">factory</span><span class="p">:</span> <span class="kt">ClassFactory</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">GeneralAction</span><span class="o">.</span><span class="nf">replaceRoot</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">GeneralStep</span><span class="o">.</span><span class="nf">root</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>

</code></pre>

<p><em>The <code><a href="Structs/ClassFactory.html">ClassFactory</a></code> will load the <code>HomeViewController</code> from the xib file named <code>HomeViewController.xib</code></em></p>

<p><em>Do not forget that if you use a combination of abstract <code><a href="Protocols/Finder.html">Finder</a></code> and <code><a href="Protocols/Factory.html">Factory</a></code> - you must specify the types of <code>UIViewController</code> and <code>Context</code> for one of them <code>ClassFinder&lt;HomeViewController, Any?&gt;</code></em></p>
<h4 id='what-will-happen-if-in-the-configuration-above-i-will-replace-code-generalstep-root-code-with-code-generalstep-current-code' class='heading'>What will happen if, in the configuration above, I will replace <code><a href="Enums/GeneralStep.html#/s:13RouteComposer11GeneralStepO4root14windowProviderAA011DestinationD0VySo16UIViewControllerCxGAA06WindowG0_p_tlFZ">GeneralStep.root(...)</a></code> with <code><a href="Enums/GeneralStep.html#/s:13RouteComposer11GeneralStepO7current14windowProviderAA011DestinationD0VySo16UIViewControllerCxGAA06WindowG0_p_tlFZ">GeneralStep.current(...)</a></code>?</h4>

<p>It will work if the user is not in some <code>UIViewController</code> that is presented modally. If they are, <code><a href="Enums/GeneralAction.html#/s:13RouteComposer13GeneralActionO11replaceRoot14windowProvider16animationOptions8durationAA21ViewControllerActionsO07ReplacefD0VAA06WindowH0_p_So015UIViewAnimationJ0VSgSdtFZ">GeneralAction.replaceRoot(...)</a></code> can not replace the modally presented <code>UIViewController</code> and the navigation will fail. If you want this configuration to work in all cases - you should explain to the router that it should start building the stack from the root view controller. Then the router will dismiss all the modal view controllers above the root view controller if there are any.</p>
<h4 id='i-want-to-push-the-code-productviewcontroller-code-into-any-code-uinavigationcontroller-code-that-is-present-anywhere-on-the-screen-even-if-the-code-uinavigationcontroller-code-is-under-some-modal-code-uiviewcontroller-code' class='heading'>I want to push the <code>ProductViewController</code> into any <code>UINavigationController</code> that is present anywhere on the screen (even if the <code>UINavigationController</code> is under some modal <code>UIViewController</code>):</h4>
<pre class="highlight swift"><code>    <span class="k">let</span> <span class="nv">screen</span> <span class="o">=</span> <span class="kt">StepAssembly</span><span class="p">(</span>
            <span class="nv">finder</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">ProductViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(),</span>
            <span class="nv">factory</span><span class="p">:</span> <span class="kt">ClassFactory</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">UINavigationController</span><span class="o">.</span><span class="nf">push</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">GeneralStep</span><span class="o">.</span><span class="nf">custom</span><span class="p">(</span><span class="nv">using</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">UINavigationController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">()))</span>
            <span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>

</code></pre>
<h4 id='the-code-productviewcontroller-code-should-be-pushed-into-any-code-uinavigationcontroller-code-if-it-is-present-on-the-screen-if-not-presented-modally' class='heading'>The <code>ProductViewController</code> should be pushed into any <code>UINavigationController</code> if it is present on the screen, if not - presented modally:</h4>
<pre class="highlight swift"><code>    <span class="k">let</span> <span class="nv">screen</span> <span class="o">=</span> <span class="kt">StepAssembly</span><span class="p">(</span>
            <span class="nv">finder</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">ProductViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(),</span>
            <span class="nv">factory</span><span class="p">:</span> <span class="kt">ClassFactory</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">UINavigationController</span><span class="o">.</span><span class="nf">push</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">SwitchAssembly</span><span class="o">&lt;</span><span class="kt">UINavigationController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">()</span>
                    <span class="o">.</span><span class="nf">addCase</span><span class="p">(</span><span class="nv">expecting</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">UINavigationController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(</span><span class="nv">options</span><span class="p">:</span> <span class="o">.</span><span class="n">visible</span><span class="p">))</span> <span class="c1">// If found - just push into it</span>
                    <span class="o">.</span><span class="nf">assemble</span><span class="p">(</span><span class="k">default</span><span class="p">:</span> <span class="p">{</span> <span class="c1">// else</span>
                        <span class="k">return</span> <span class="kt">ChainAssembly</span><span class="p">()</span>
                                <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">SingleContainerStep</span><span class="p">(</span><span class="nv">finder</span><span class="p">:</span> <span class="kt">NilFinder</span><span class="p">(),</span> <span class="nv">factory</span><span class="p">:</span> <span class="kt">NavigationControllerFactory</span><span class="p">()))</span>
                                <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">GeneralAction</span><span class="o">.</span><span class="nf">presentModally</span><span class="p">())</span>
                                <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">GeneralStep</span><span class="o">.</span><span class="nf">current</span><span class="p">())</span>
                                <span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>
                    <span class="p">})</span>
            <span class="p">)</span><span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>
</code></pre>
<h4 id='i-want-to-present-the-code-uitabbarcontroller-code-with-the-code-homeviewcontroller-code-and-the-code-accountviewcontroller-code-in-the-tabs' class='heading'>I want to present the <code>UITabBarController</code> with the <code>HomeViewController</code> and the <code>AccountViewController</code> in the tabs:</h4>
<pre class="highlight swift"><code>    <span class="k">let</span> <span class="nv">tabScreen</span> <span class="o">=</span> <span class="kt">SingleContainerStep</span><span class="p">(</span>
            <span class="nv">finder</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="p">(),</span>
            <span class="nv">factory</span><span class="p">:</span> <span class="kt">CompleteFactoryAssembly</span><span class="p">(</span><span class="nv">factory</span><span class="p">:</span> <span class="kt">TabBarControllerFactory</span><span class="p">())</span>
                    <span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="kt">ClassFactory</span><span class="o">&lt;</span><span class="kt">HomeViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(),</span> <span class="nv">using</span><span class="p">:</span> <span class="kt">UITabBarController</span><span class="o">.</span><span class="nf">add</span><span class="p">())</span>
                    <span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="kt">ClassFactory</span><span class="o">&lt;</span><span class="kt">AccountViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(),</span> <span class="nv">using</span><span class="p">:</span> <span class="kt">UITabBarController</span><span class="o">.</span><span class="nf">add</span><span class="p">())</span>
                    <span class="o">.</span><span class="nf">assemble</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">GeneralAction</span><span class="o">.</span><span class="nf">replaceRoot</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">GeneralStep</span><span class="o">.</span><span class="nf">root</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>
</code></pre>
<h4 id='i-want-to-use-custom-code-uiviewcontrollertransitioningdelegate-code-with-the-code-generalaction-presentmodally-code-action' class='heading'>I want to use custom <code>UIViewControllerTransitioningDelegate</code> with the <code><a href="Enums/GeneralAction.html#/s:13RouteComposer13GeneralActionO14presentModally12startingFrom17presentationStyle010transitionJ021transitioningDelegate20preferredContentSize21isModalInPresentation20popoverConfigurationAA21ViewControllerActionsO07PresentfD0VAO0rT13StartingPointO_So07UIModaltJ0VSgSo017UIModalTransitionJ0VSgSo06UIViewx13TransitioningM0_pSgSo6CGSizeVSgSbSgySo09UIPopovertX0CcSgtFZ">GeneralAction.presentModally(...)</a></code> action:</h4>
<pre class="highlight swift"><code>    <span class="k">let</span> <span class="nv">transitionController</span> <span class="o">=</span> <span class="kt">CustomViewControllerTransitioningDelegate</span><span class="p">()</span>

    <span class="c1">// Configuration</span>
    <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">GeneralAction</span><span class="o">.</span><span class="nf">presentModally</span><span class="p">(</span><span class="nv">transitioningDelegate</span><span class="p">:</span> <span class="n">transitionController</span><span class="p">))</span>
</code></pre>
<h4 id='i-want-to-navigate-to-the-code-accountviewcontroller-code-if-the-user-is-in-another-tab-or-even-if-the-user-is-in-some-code-uiviewcontroller-code-presented-modally' class='heading'>I want to navigate to the <code>AccountViewController</code> if the user is in another tab or even if the user is in some <code>UIViewController</code> presented modally:</h4>
<pre class="highlight swift"><code>    <span class="k">let</span> <span class="nv">screen</span> <span class="o">=</span> <span class="kt">StepAssembly</span><span class="p">(</span>
            <span class="nv">finder</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">AccountViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(),</span>
            <span class="nv">factory</span><span class="p">:</span> <span class="kt">NilFactory</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="n">tabScreen</span><span class="p">)</span>
            <span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>
</code></pre>

<p><em>Why is the <code><a href="Structs/NilFactory.html">NilFactory</a></code> used here? We do not need to build anything: The <code>AccountViewController</code> will be built in the dependent <code>tabScreen</code> configuration. See the <code>tabScreen</code> configuration above.</em></p>
<h4 id='i-want-to-modally-present-code-forgotpasswordviewcontroller-code-but-after-code-loginviewcontroller-code-in-the-code-uinavigationcontroller-code' class='heading'>I want to modally present <code>ForgotPasswordViewController</code>, but after <code>LoginViewController</code> in the <code>UINavigationController</code>:</h4>
<pre class="highlight swift"><code>    <span class="k">let</span> <span class="nv">loginScreen</span> <span class="o">=</span> <span class="kt">StepAssembly</span><span class="p">(</span>
            <span class="nv">finder</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">LoginViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(),</span>
            <span class="nv">factory</span><span class="p">:</span> <span class="kt">ClassFactory</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">UINavigationController</span><span class="o">.</span><span class="nf">push</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">NavigationControllerStep</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">GeneralAction</span><span class="o">.</span><span class="nf">presentModally</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">GeneralStep</span><span class="o">.</span><span class="nf">current</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>

    <span class="k">let</span> <span class="nv">forgotPasswordScreen</span> <span class="o">=</span> <span class="kt">StepAssembly</span><span class="p">(</span>
            <span class="nv">finder</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">ForgotPasswordViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(),</span>
            <span class="nv">factory</span><span class="p">:</span> <span class="kt">ClassFactory</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">UINavigationController</span><span class="o">.</span><span class="nf">push</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="n">loginScreen</span><span class="o">.</span><span class="nf">expectingContainer</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>

</code></pre>

<p><em>With the configuration above you will be able to navigate to both screens using the <code><a href="Protocols/Router.html">Router</a></code></em></p>
<h4 id='why-do-we-use-code-destinationstep-expectingcontainer-code-here' class='heading'>Why do we use <code><a href="Structs/DestinationStep.html#/s:13RouteComposer15DestinationStepV18expectingContainerACyqd__q_GyAA0F14ViewControllerRd__lF">DestinationStep.expectingContainer(...)</a></code> here?</h4>

<p>Because <code>UINavigationController.push(...)</code> action requires <code>UINavigationController</code> to be previous <code>UIViewController</code> in the chain. <code><a href="Structs/DestinationStep.html#/s:13RouteComposer15DestinationStepV18expectingContainerACyqd__q_GyAA0F14ViewControllerRd__lF">DestinationStep.expectingContainer(...)</a></code> method allows us to escape this check. You guarantee that it will be there by the time <code>UINavigationController.push(...)</code> will start to perform.</p>
<h4 id='what-will-happen-if-in-the-configuration-above-i-will-replace-the-code-generalstep-current-code-with-the-code-generalstep-root-code' class='heading'>What will happen if, in the configuration above, I will replace the <code><a href="Enums/GeneralStep.html#/s:13RouteComposer11GeneralStepO7current14windowProviderAA011DestinationD0VySo16UIViewControllerCxGAA06WindowG0_p_tlFZ">GeneralStep.current(...)</a></code> with the <code><a href="Enums/GeneralStep.html#/s:13RouteComposer11GeneralStepO4root14windowProviderAA011DestinationD0VySo16UIViewControllerCxGAA06WindowG0_p_tlFZ">GeneralStep.root(...)</a></code>?</h4>

<p>It will work, but it means that the router has to start building the stack from the root <code>UIViewController</code>, so if the user is in some <code>UIViewController</code> presented modally - the router will close it before it will start the navigation.</p>
<h4 id='the-app-has-a-tab-bar-controller-with-the-code-homeviewcontroller-code-and-the-code-bagviewcontroller-code-inside-the-user-should-be-able-to-navigate-to-the-bag-manually-using-the-tab-bar-but-if-they-tap-on-the-button-quot-go-to-bag-quot-in-the-code-homeviewcontroller-code-the-app-should-present-the-code-bagviewcontroller-code-modally-the-same-should-happen-if-the-user-has-to-be-sent-to-the-bag-using-an-universal-link' class='heading'>The app has a tab bar controller with the <code>HomeViewController</code> and the <code>BagViewController</code> inside. The user should be able to navigate to the bag manually using the tab bar. But if they tap on the button &ldquo;Go to Bag&rdquo; in the <code>HomeViewController</code>, the app should present the <code>BagViewController</code> modally. The same should happen if the user has to be sent to the bag using an Universal Link.</h4>

<p>There are two ways of implementing this configuration:</p>

<ol>
<li><p>To use the <code><a href="Structs/NilFinder.html">NilFinder</a></code> which means that the router will never find an existing <code>BagViewController</code> on the screen and will always create a new one and present it modally. However, this has a downside: If the user is already in the <code>BagViewController</code> presented modally, and then he taps on the push notification that deep links him to the bag again, the router will build another <code>BagViewController</code> and present it modally on top.</p></li>
<li><p>Tweak the <code><a href="Structs/ClassFinder.html">ClassFinder</a></code> slightly so it will ignore the <code>BagViewController</code> that is not presented modally and use it in the configuration:</p></li>
</ol>
<pre class="highlight swift"><code>    <span class="kd">struct</span> <span class="kt">ModalBagFinder</span><span class="p">:</span> <span class="kt">StackIteratingFinder</span>  <span class="p">{</span>

        <span class="kd">func</span> <span class="nf">isTarget</span><span class="p">(</span><span class="n">_</span> <span class="nv">viewController</span><span class="p">:</span> <span class="kt">BagViewController</span><span class="p">,</span> <span class="n">with</span> <span class="nv">context</span><span class="p">:</span> <span class="kt">Any</span><span class="p">?)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span> <span class="p">{</span>
            <span class="k">return</span> <span class="n">viewController</span><span class="o">.</span><span class="n">presentingViewController</span> <span class="o">!=</span> <span class="kc">nil</span>
        <span class="p">}</span>

    <span class="p">}</span>

    <span class="k">let</span> <span class="nv">screen</span> <span class="o">=</span> <span class="kt">StepAssembly</span><span class="p">(</span>
        <span class="nv">finder</span><span class="p">:</span> <span class="kt">ModalBagFinder</span><span class="p">(),</span>
        <span class="nv">factory</span><span class="p">:</span> <span class="kt">ClassFactory</span><span class="p">())</span>
        <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">UINavigationController</span><span class="o">.</span><span class="nf">push</span><span class="p">())</span>
        <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">NavigationControllerStep</span><span class="p">())</span>
        <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">GeneralAction</span><span class="o">.</span><span class="nf">presentModally</span><span class="p">())</span>
        <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">GeneralStep</span><span class="o">.</span><span class="nf">current</span><span class="p">())</span>
        <span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>

</code></pre>
<h4 id='the-app-has-a-tab-bar-controller-user-can-browse-the-same-content-in-both-tabs-the-first-tab-has-the-code-hotelviewcontroller-code-and-the-code-roomviewcontroller-code-within-the-code-uinavigationcontroller-code-second-tab-the-code-hotelviewcontroller-code-inside-the-user-is-in-the-first-tab-and-the-code-roomviewcontroller-code-is-visible-if-they-tap-on-the-button-quot-show-hotel-quot-in-the-code-roomviewcontroller-code-the-app-should-pop-to-the-code-hotelviewcontroller-code-within-the-current-code-uinavigationcontroller-code-but-not-to-switch-the-tab' class='heading'>The app has a tab bar controller. User can browse the same content in both tabs. The first tab has the <code>HotelViewController</code> and the <code>RoomViewController</code> within the <code>UINavigationController</code>. Second tab the <code>HotelViewController</code> inside. The user is in the first tab, and the <code>RoomViewController</code> is visible. If they tap on the button &ldquo;Show hotel&rdquo; in the <code>RoomViewController</code>, the app should pop to the <code>HotelViewController</code> within the current <code>UINavigationController</code> but not to switch the tab.</h4>

<p>You have to user the <code><a href="Structs/DefaultStackIterator/StartingPoint.html#/s:13RouteComposer20DefaultStackIteratorV13StartingPointO6customyAESo16UIViewControllerCSgyKXAcAEmF">DefaultStackIterator.StartingPoint.custom(...)</a></code> option and provide the correct starting point, if you are using the default <code><a href="Structs/ClassFinder.html">ClassFinder</a></code> in your configuration. Otherwise, the router will just switch the tab to present the already present <code>HotelViewController</code> there.</p>
<pre class="highlight swift"><code>    <span class="k">let</span> <span class="nv">screenConfig</span><span class="p">:</span> <span class="kt">DestinationStep</span><span class="o">&lt;</span><span class="kt">SquareViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span> <span class="o">=</span> <span class="kt">StepAssembly</span><span class="p">(</span>
            <span class="nv">finder</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">SquareViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(</span><span class="nv">options</span><span class="p">:</span> <span class="o">.</span><span class="n">currentVisibleOnly</span><span class="p">,</span>
                    <span class="nv">startingPoint</span><span class="p">:</span> <span class="o">.</span><span class="nf">custom</span><span class="p">(</span><span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">UINavigationController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(</span><span class="nv">options</span><span class="p">:</span> <span class="o">.</span><span class="n">currentVisibleOnly</span><span class="p">,</span> <span class="nv">startingPoint</span><span class="p">:</span> <span class="o">.</span><span class="n">root</span><span class="p">)</span><span class="o">.</span><span class="nf">findViewController</span><span class="p">())),</span>
            <span class="nv">factory</span><span class="p">:</span> <span class="kt">StoryboardFactory</span><span class="o">&lt;</span><span class="kt">SquareViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(</span><span class="nv">storyboardName</span><span class="p">:</span> <span class="s">"TabBar"</span><span class="p">,</span> <span class="nv">viewControllerID</span><span class="p">:</span> <span class="s">"Square"</span><span class="p">))</span>
            <span class="o">.</span><span class="nf">adding</span><span class="p">(</span><span class="kt">ExampleGenericContextTask</span><span class="o">&lt;</span><span class="kt">SquareViewController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">using</span><span class="p">(</span><span class="kt">UINavigationController</span><span class="o">.</span><span class="nf">push</span><span class="p">())</span>
            <span class="o">.</span><span class="nf">from</span><span class="p">(</span><span class="kt">GeneralStep</span><span class="o">.</span><span class="nf">custom</span><span class="p">(</span><span class="nv">using</span><span class="p">:</span> <span class="kt">ClassFinder</span><span class="o">&lt;</span><span class="kt">UINavigationController</span><span class="p">,</span> <span class="kt">Any</span><span class="p">?</span><span class="o">&gt;</span><span class="p">(</span><span class="nv">options</span><span class="p">:</span> <span class="o">.</span><span class="n">currentVisibleOnly</span><span class="p">,</span> <span class="nv">startingPoint</span><span class="p">:</span> <span class="o">.</span><span class="n">root</span><span class="p">)))</span>
            <span class="o">.</span><span class="nf">assemble</span><span class="p">()</span>
</code></pre>

          </div>
        </section>


      </article>
    </div>
    <section class="footer">
      <p>&copy; 2022 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2022-10-21)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
    </section>
  </body>
</html>
